import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-demo5',
  templateUrl: './demo5.component.html',
  styles: []
})
export class Demo5Component implements OnInit {
  value1: number = 10;

  disabled = true;

  btnText = 'Enable';
  constructor() {}

  ngOnInit() {}

  change() {
    this.disabled = !this.disabled;

    if (this.disabled) {
      this.btnText = 'Enable';
    } else {
      this.btnText = 'Disable';
    }
  }
}